#!/bin/bash
#sudo apt install  python-pip
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev python-openssl git
#git clone https://gitee.com/luquanwei/python.git mypython
#mkdir ~/.pip
#cp mypython/pip.conf ~/.pip/pip.conf
#pip install ipdb
#pip install pycodestyle
#pip install autopep8
#pip install jedi
#pip2 install ipython
#pip3 install ipython
git clone https://gitee.com/mirrors/pyenv.git ~/.pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
source ~/.bash_profile
git clone https://github.com/yyuu/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bash_profile
source ~/.bash_profile
echo 'source ~/.bash_profile' >> ~/.bashrc

# export PYTHON_BUILD_MIRROR_URL="http://mirrors.sohu.com/python/2.7.12/"
